<?php 
/**
 * 最爱商品管理模型
 */
class LoveModel extends Model{
    public $table ='love' ;
    
    public $auto = array(
		array('gid','_gid','method',2,1),
		array('uid','_uid','method',2,1),
	);
	public function _gid(){
		return Q('get.gid',0,'intval');
	}
	public function _uid(){
		return session('uid');
	}    
    public $validate = array();
    
    public function addLove(){
    	$this->create();
    	$this->add();
    }
 }
 
 
 
 
 
 
 
 
 
 
 








 ?>